#ifndef APPLICATION_HPP
#define APPLICATION_HPP

#include <QtGui/QAction>
#include <QtGui/QMenu>
#include <QtGui/QApplication>
#include <QtGui/QMainWindow>
#include <QtSingleApplication>
#include "ui_mainwindow.h"
#include "ui/UiContainer.hpp"
#include "mod/config/ConfigManager.hpp"
#include "mod/player/Player.hpp"

/**
 * @brief Class that contains all modules and UI objects
 */
class Application : public QMainWindow {
    Q_OBJECT
    private:
        //left panel widgets
        CollectionWidget *lw;
        HistoryWidget *hw;
        WishlistWidget *ww;

        Ui_MainWindow *ui;
        ConfigManager *cm;
        Player *player;

        /** @brief Initialize player with the associated UI components */
        void setupPlayer();
        /** @brief Initialize UI components */
        void setupUi();
    public:
        Application(QMainWindow* parent = 0, Qt::WFlags flags = Qt::Window);
        virtual ~Application();
    public slots:
        /** * @brief updateSeeking Update seekbar, elapsed and remainint time labels
         * @param ms Current track playback position
         * @param duration Track duration
         */
        void updateSeeking(int ms,int duration);
        /** @brief Triggered when a user click on the mute button */
        void setToggleMute();
        /** @brief Toggle buttons in the left panel and display the associated widget */
        void toggleLeftPanel();
};

/** @brief Function called at the start of the program. If you do not know this, start to learn programming xD
 * You can give filepath(s) as argument. It will be played immediately or added to the end of the playlist depending on the configuration
 * @param argc Number of argument
 * @param argv Argument value
 * @return 0 if no error, otherwise any value
 */
int main(int argc, char** argv);

#endif // APPLICATION_HPP
